from apps.interface.node.baseViews import *
from apps.system.lessee.dao import LesseeDao

class NodeViewForCSet(BaseNodeViewSet):

    '''保存节点配置'''
    @action(methods=['post'], detail=False)
    def getHomeNoticeText(self, request):
        params = getRequestParams(request)
        _lessee = LesseeDao().findAll().filter(lessee_client__clientname=params.get('clientname')).first()
        print('_lessee', _lessee)
        text = "今日金价：" + str(_lessee.goldPrice) + '元/克'
        textList = []
        textList.append(text)
        return Response(response_success({'textList': textList}))
